-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib: make structuredClone spec compliant #40251
Conversation
It would be nice to have a WPT for this. |
BTW, I'm not sure we should throw an error, but instead just grab |
We mostly just throw an error if the passed value is not spec complaint in most cases, throwing an error here would be nice for keeping consistency unless there's a special case where we have to avoid throwing an error. |
What's important here is not consistency, but spec compliance. The spec just asks to pass const options = [];
options.transfer = [toTransfer];
structuredClone({}, options); |
8537f2e
to
ab4fd2b
Compare
ab4fd2b
to
0fd3037
Compare
Do we have a WHATWG spec specialist that we could ping to take a look? |
Maybe @surma would be available to review this, since they are the one who proposed this API to WHATWG. |
Landed in 6199441...3d11baf |
Fixes: #40246